package com.huike.clues.mapper;

import com.huike.clues.domain.TbAssignRecord;
import com.huike.common.annotation.AutoFill;
import com.huike.common.enums.DaoOperationType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: wwq
 * @Date: 2023/07/12/18:34
 * @Description:
 */
@Mapper
public interface TbAssignRecordMapper {
    /**
     *  添加分配记录
     * @param tbBusinessAssignRecord
     * @return
     */
    @AutoFill(DaoOperationType.INSERT)
    int add(TbAssignRecord tbBusinessAssignRecord);

    @AutoFill(DaoOperationType.INSERT)
    int insert(TbAssignRecord assignRecord);

    @AutoFill(DaoOperationType.UPDATE)
    int update(TbAssignRecord assignRecord);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    int updateLatest(Long assignId, String type);

    int countAssignCluesByUser(Long userId);

    int countAssignBusinessByUser(Long userId);

    TbAssignRecord getById(Long id);

    TbAssignRecord getByAssignId(Long assignId, String type);

    List<TbAssignRecord> getAssignRecordList(TbAssignRecord assignRecord);
}
